package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.PaymentRecordMapper;
import com.education.wisdom.pojo.PaymentRecord;
import com.education.wisdom.service.IPaymentRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 支付记录 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-20
 */
@Service
public class PaymentRecordServiceImpl implements IPaymentRecordService
{
	@Autowired
	private PaymentRecordMapper paymentRecordMapper;

	@Override
	public List<PaymentRecord> selectPaymentRecordSearch(PaymentRecord paymentRecord) {
		return paymentRecordMapper.selectPaymentRecordSearch(paymentRecord);
	}

	/**
     * 查询支付记录信息
     * 
     * @param id 支付记录ID
     * @return 支付记录信息
     */
    @Override
	public PaymentRecord selectPaymentRecordById(Integer id)
	{
	    return paymentRecordMapper.selectPaymentRecordById(id);
	}

	    @Override
	public PaymentRecord selectPaymentRecordByrId(String recordId)
	{
	    return paymentRecordMapper.selectPaymentRecordByrId(recordId);
	}

	/**
     * 查询支付记录列表
     * 
     * @param paymentRecord 支付记录信息
     * @return 支付记录集合
     */
	@Override
	public List<PaymentRecord> selectPaymentRecordList(PaymentRecord paymentRecord)
	{
	    return paymentRecordMapper.selectPaymentRecordList(paymentRecord);
	}
	
    /**
     * 新增支付记录
     * 
     * @param paymentRecord 支付记录信息
     * @return 结果
     */
	@Override
	public int insertPaymentRecord(PaymentRecord paymentRecord)
	{
	    return paymentRecordMapper.insertPaymentRecord(paymentRecord);
	}
	
	/**
     * 修改支付记录
     * 
     * @param paymentRecord 支付记录信息
     * @return 结果
     */
	@Override
	public int updatePaymentRecord(PaymentRecord paymentRecord)
	{
	    return paymentRecordMapper.updatePaymentRecord(paymentRecord);
	}
	@Override
	public int updatePaymentRecordByuserid(PaymentRecord paymentRecord)
	{
	    return paymentRecordMapper.updatePaymentRecordByuserid(paymentRecord);
	}

	/**
     * 删除支付记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deletePaymentRecordByIds(String ids)
	{
		return paymentRecordMapper.deletePaymentRecordByIds(Convert.toStrArray(ids));
	}

	@Override
	public PaymentRecord selectPaymentRecordByRecordId(String recordId) {
		return paymentRecordMapper.selectPaymentRecordByRecordId(recordId);
	}

}
